//
//  SinaWeibo2APIEngine.h
//  ShareKit
//
//  Created by 凯 赵 on 12-5-7.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//
//http://open.weibo.com/wiki/API%E6%96%87%E6%A1%A3_V2
#import <UIKit/UIKit.h>
#import "SHKSinaWeiboV2OAuthView.h"


@interface SinaWeiBoV2 : MKNetworkEngine <WBAuthorizeWebViewDelegate,SHKOAuthViewDelegate>

typedef void (^SinaWeiBoV2ResponseBlock)(NSDictionary* responseData);
typedef void (^SinaWeiBoV2ErrorBlock)(NSDictionary* responseData, NSError* error);

+ (id) sharedInstance ;
- (NSString *)sharerId;
- (NSString *)sharerName;

- (void)logout;
- (BOOL)islogin;
- (BOOL)autologin;

//通用请求接口
-(MKNetworkOperation*)  requestAPI:(NSString*)apiPath
                        httpMethod:(NSString *)httpMethod
                            params:(NSDictionary *)params
                      onCompletion:(SinaWeiBoV2ResponseBlock) completionBlock
                           onError:(SinaWeiBoV2ErrorBlock) errorBlock;

//发送微薄，考虑是否做成发送队列
-(MKNetworkOperation*)  update:(NSString*)text
                        image:(UIImage *)image
                      onCompletion:(SinaWeiBoV2ResponseBlock) completionBlock
                           onError:(SinaWeiBoV2ErrorBlock) errorBlock;

@end
